/** @type {import('next').NextConfig} */
import withLess from "next-with-less"
import path from 'node:path';
 
const nextConfig = {
    webpack(config, options) {
        config.module.rules.forEach((rule) => {
          const { oneOf } = rule;
          if (oneOf) {
            oneOf.forEach((one) => {
              if (!`${one.issuer?.and}`.includes('_app')) return;
              one.issuer.and = [path.resolve(__dirname)];
            });
          }
        })
        return config;
    },
    output: 'export'
  }
export default withLess(nextConfig);
